<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<include file="Public:base" />
<script type="text/javascript">
$(document).ready(function() {
	
$("#baseset").validate({
		
		errorPlacement: function (error, element) {
            //error.appendTo(element.parent());
            element.parent().addClass("has-error");
        },
        //获取焦点时不验证 
        focusInvalid: false,   
        onkeyup: false ,
		//debug:true,
        
	    rules: {
	        'title': {
	            required: true
	        },
	        'keyword': {
	            required: true
	        },
	        'phone': {
	            required: true
	        },
	        'code': {
	            required: true
	        },
	        'statement': {
	            required: true
	        }
	    },
	    messages: {
	        'title': {
	            required: "请输入标题 "
	        },
	        'keyword': {
	            required: "请输入关键字 "
	        },
	        'phone': {
	            required: "请输入关键字 "
	        },
	        'code': {
	            required: "请填写统计代码 "
	        },
	        'statement': {
	            required: "请输入声明内容"
	        }
	    }
	});
	
});
</script>
</head>
<body>
<include file="Public:header" />

<div class="home-index">
  <div class="container">
    <div class="row">
      <ol class="breadcrumb">
        <li>首页</li>
        <li>系统设置</li>
        <li class="active">基本设置</li>
      </ol>
      <div class="comm-box">
        <form id="baseset" class="form-horizontal" role="form" method="post" action="__URL__/doset">
          <div class="form-group">
            <label class="col-sm-2 control-label">标题（SEO）</label>
            <div class="col-sm-6">
              <input type="text" value="{$data.title}" name="title" class="form-control" i placeholder="请输入标题title">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">关键词（SEO）</label>
            <div class="col-sm-6">
              <input type="text" value="{$data.keyword}" name="keyword" class="form-control"  placeholder="请输入关键词keyword">
            </div>
            
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">联系方式</label>
            <div class="col-sm-6">
              <input type="text" value="{$data.phone}" name="phone" class="form-control"  placeholder="请输入联系电话">
            </div>
            
          </div>
          
          <div class="form-group">
            <label class="col-sm-2 control-label">统计代码</label>
            <div class="col-sm-6">
              <textarea class="form-control" name="code" rows="3" placeholder="请将您的统计代码复制到这里">{$data.code}</textarea>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">责任声明</label>
            <div class="col-sm-6">
              <textarea class="form-control" name="statement" rows="6" placeholder="请输入声明内容">{$data.statement}</textarea>
            </div>
          </div>
         
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
            
            <input type="hidden" name="id"  value='{$data.id}' >
            
              <button type="submit" class="btn btn-primary">更新</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

</body>
</html>